#ifndef __BOARD_ASSEMBLY_H__
#define __BOARD_ASSEMBLY_H__
#include "MessageRouter.h"
#include "Gateway.h"
#include "BoardConf.h"
#include "ServiceFactory.h"
#include "Memory.h"

/**
* Main assembly class. 
* - has enrty point for main controll loop
* - agregates all necessary components
*/

class IArduino;
class IEthernet;

class BoardAssembly {
public:
	BoardAssembly(IArduino& a, IEthernet& e, ILogger& l, String name);
	~BoardAssembly();
	virtual void loop();
	MessageRouter& getRouter(); 
private:
	IArduino& arduino_;
	IEthernet& ethernet_;
	ILogger& logger_;
	ServiceFactory factory_;
	
	MessageRouter router_;
	Gateway gateway_;	
	BoardConf conf_;
	Memory mem_;
	char* _name;
};

#endif